MOSIP-44431:Masterdata - Update the test case descriptions to improve…#1343
MOSIP-44431:Masterdata - Update the test case descriptions to improve…#1343Famuda1234 wants to merge 4 commits intomosip:developfrom
Conversation
… clarity Signed-off-by: Famuda1234 <famuda.m@cyberpwn.com>
WalkthroughThis PR restricts per-language test runs to a single iteration, replaces and expands masterdata configuration properties, and rewrites descriptions in dozens of masterdata YAML test files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… clarity and readability Signed-off-by: Famuda1234 <famuda.m@cyberpwn.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In
`@api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testrunner/MosipTestRunner.java`:
- Around line 104-106: The loop in MosipTestRunner.java that clears and sets
BaseTestCase.languageList uses a hardcoded `i < 1` which will attempt
`localLanguageList.get(0)` even when the source list is empty; modify the loop
to guard against empty lists (e.g., iterate up to Math.min(1,
localLanguageList.size()) or add an explicit check `if
(localLanguageList.isEmpty()) return/continue` before the loop) so that the code
in the block that calls BaseTestCase.languageList.clear() and
BaseTestCase.languageList.add(localLanguageList.get(i)) never executes when
localLanguageList is empty.
In `@api-test/src/main/resources/config/masterdata.properties`:
- Around line 21-42: This file contains hardcoded secrets (keys like
keycloak_Password, postgres-password, audit_password, partner_password, and
mosip_*_client_secret / AuthClientSecret) which must be removed from source;
replace each literal value with a reference to a runtime secret (e.g.,
environment variable names or a single external secrets file path) and update
consumers to read from env or a secret loader instead of masterdata.properties,
add the external secrets file pattern to .gitignore (or ensure env-only usage),
and after changing the file rotate the exposed credentials and purge them from
git history (BFG/git-filter-branch) to eliminate the committed secrets.
In
`@api-test/src/main/resources/masterdata/DeleteUserCenterMapping/DeleteUserCenterMapping.yml`:
- Line 5: The description field in DeleteUserCenterMapping.yml is truncated
("vali"); update the description value for the test case in
DeleteUserCenterMapping to the full sentence, e.g., "Verify that the system
successfully deletes a user-center mapping when all details are valid", by
editing the description entry in the DeleteUserCenterMapping.yml file (look for
the description key in the DeleteUserCenterMapping test definition).
🧹 Nitpick comments (2)
api-test/src/main/resources/masterdata/DeleteUserCenterMapping/DeleteUserCenterMapping.yml (1)
20-20: Consider being more specific about what is invalid.The test specifically validates behavior with an invalid ID (line 26), so the description could be more precise by stating "invalid ID" rather than the generic "invalid details".
✨ Suggested improvement
- description: Verify that the system does not delete a user-center mapping when invalid details are provided + description: Verify that the system does not delete a user-center mapping when an invalid ID is providedapi-test/src/main/resources/masterdata/DeviceSpecification/UpdateDeviceSpecification.yml (1)
462-467: Minor:descriptionfield ordering is inconsistent with other test cases.In all other test cases in this file (and across the PR),
descriptionappears immediately afteruniqueIdentifier. Here it's placed aftertemplateFields(Lines 465-467). Consider reordering for consistency.Suggested reorder
MasterData_UpdateDeviceSpecification_InputParameter_MinDriverversion_AboveMaxLen16: endPoint: /v1/masterdata/devicespecifications uniqueIdentifier: TC_Masterdata_UpdateDeviceSpecification_17 + description: Verify that the system does not update a device specification when the minimum driver version exceeds 16 characters role: admin templateFields: ["name","description"] - description: Verify that the system does not update a device specification when the minimum driver version exceeds 16 characters restMethod: put
| for (int i = 0; i < 1; i++) { | ||
| BaseTestCase.languageList.clear(); | ||
| BaseTestCase.languageList.add(localLanguageList.get(i)); |
There was a problem hiding this comment.
Hardcoding i < 1 removes the empty-list guard the original loop had.
Previously, i < localLanguageList.size() would safely skip the loop body when no languages were configured. Now i < 1 always enters the loop, and localLanguageList.get(0) on Line 106 will throw an IndexOutOfBoundsException if BaseTestCase.getLanguageList() returns an empty list.
If single-language execution is intentional, guard against an empty list or at least use Math.min(1, localLanguageList.size()):
Proposed fix
- for (int i = 0; i < 1; i++) {
+ for (int i = 0; i < Math.min(1, localLanguageList.size()); i++) {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for (int i = 0; i < 1; i++) { | |
| BaseTestCase.languageList.clear(); | |
| BaseTestCase.languageList.add(localLanguageList.get(i)); | |
| for (int i = 0; i < Math.min(1, localLanguageList.size()); i++) { | |
| BaseTestCase.languageList.clear(); | |
| BaseTestCase.languageList.add(localLanguageList.get(i)); |
🤖 Prompt for AI Agents
In
`@api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testrunner/MosipTestRunner.java`
around lines 104 - 106, The loop in MosipTestRunner.java that clears and sets
BaseTestCase.languageList uses a hardcoded `i < 1` which will attempt
`localLanguageList.get(0)` even when the source list is empty; modify the loop
to guard against empty lists (e.g., iterate up to Math.min(1,
localLanguageList.size()) or add an explicit check `if
(localLanguageList.isEmpty()) return/continue` before the loop) so that the code
in the block that calls BaseTestCase.languageList.clear() and
BaseTestCase.languageList.add(localLanguageList.get(i)) never executes when
localLanguageList is empty.
| endPoint: /v1/masterdata/usercentermapping/{id} | ||
| uniqueIdentifier: TC_Masterdata_DeleteUserCenterMapping_01 | ||
| description: Delete User Center Mapping with all valid data | ||
| description: Verify that the system successfully deletes a user-center mapping when all details are vali |
There was a problem hiding this comment.
Complete the truncated description.
The description appears to be cut off, ending with "vali" instead of "valid".
📝 Proposed fix
- description: Verify that the system successfully deletes a user-center mapping when all details are vali
+ description: Verify that the system successfully deletes a user-center mapping when all details are valid📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: Verify that the system successfully deletes a user-center mapping when all details are vali | |
| description: Verify that the system successfully deletes a user-center mapping when all details are valid |
🤖 Prompt for AI Agents
In
`@api-test/src/main/resources/masterdata/DeleteUserCenterMapping/DeleteUserCenterMapping.yml`
at line 5, The description field in DeleteUserCenterMapping.yml is truncated
("vali"); update the description value for the test case in
DeleteUserCenterMapping to the full sentence, e.g., "Verify that the system
successfully deletes a user-center mapping when all details are valid", by
editing the description entry in the DeleteUserCenterMapping.yml file (look for
the description key in the DeleteUserCenterMapping test definition).
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
api-test/src/main/resources/config/masterdata.properties (1)
139-152: 🛠️ Refactor suggestion | 🟠 MajorDocument how to populate empty secrets at runtime.
The hardcoded secrets issue from the previous review has been properly addressed by using empty placeholders. However, there's no documentation explaining how these should be populated at runtime (e.g., via environment variables, external secrets file, or secrets management service).
Adding documentation will help users deploy this correctly without accidentally committing secrets.
📝 Suggested documentation addition
Add a comment block above line 139:
`#----------------------------------` Client Secret Keys -----------------------# `#--` When test rig ran in docker, these values derived from the environment ---# # # IMPORTANT: Do not hardcode secrets in this file. # These values should be provided at runtime via: # - Environment variables (recommended): export mosip_partner_client_secret=<value> # - External secrets file: Specify path via -Dsecrets.file=<path> # - Secrets management service: AWS Secrets Manager, HashiCorp Vault, etc. # # Example using environment variables: # mosip_partner_client_secret = ${mosip_partner_client_secret} #
🤖 Fix all issues with AI agents
In `@api-test/src/main/resources/config/masterdata.properties`:
- Around line 254-260: The properties OTPTimeOut, attempt, ConfigParameters, and
langselect in masterdata.properties appear unused; either remove them to reduce
config clutter or add documentation comments above each explaining intended
purpose, valid values, and where they are consumed (e.g., OTPTimeOut -> OTP
expiry in seconds, attempt -> retry count, ConfigParameters -> comma-separated
keys, langselect -> environment language selector). Update the file by deleting
unused lines or replacing them with commented descriptions and example values,
and if you keep them, add a short comment referencing the related feature or
future ticket/constant name so their purpose is clear (refer to property names
OTPTimeOut, attempt, ConfigParameters, langselect).
🧹 Nitpick comments (3)
api-test/src/main/resources/config/masterdata.properties (3)
111-111: Minor typo in comment."dervied" should be "derived". This typo appears in multiple section headers (lines 111, 124, 140, 167, 190).
✏️ Suggested fix
-#-- When test rig ran in docker, these values dervied from the environment ---# +#-- When test rig ran in docker, these values derived from the environment ---#Apply this fix to all occurrences (lines 111, 124, 140, 167, 190).
189-219: Document required vs. optional DB configuration values.Multiple DB-related properties are empty, including passwords (lines 198, 204, 216) and infrastructure values like
DB_PORT(line 200) andinstallation-domain(line 201). While empty passwords are correct for security, empty infrastructure values may cause runtime failures.Consider adding comments indicating:
- Which properties are required vs. optional
- Default values if applicable
- How these should be provided (environment variables, etc.)
270-271: Clarify the purpose of the commented-out configuration.Line 271 contains a commented-out configuration that appears to be an example for
mosip_components_base_urls. Consider adding a comment to clarify whether this is:
- An example format for users to follow
- Deprecated configuration that should be removed
- A template to be uncommented in certain scenarios
📝 Example clarification
mosip_components_base_urls= -#auditmanager=api-internal.released.mosip.net;idrepository=api-internal.released.mosip.net;partnermanager=api-internal.released.mosip.net;idauthentication=api-internal.released.mosip.net;policymanager=api-internal.released.mosip.net;authmanager=api-internal.released.mosip.net;resident=api-internal.released.mosip.net;preregistration=api-internal.released.mosip.net;masterdata=api-internal.released.mosip.net;idgenerator=api-internal.released.mosip.net; +# Example format (semicolon-separated component=host pairs): +# mosip_components_base_urls=auditmanager=api-internal.example.net;idrepository=api-internal.example.net
… clarity and readability Signed-off-by: Famuda1234 <famuda.m@cyberpwn.com>
… clarity and readability Signed-off-by: Famuda1234 <famuda.m@cyberpwn.com>
There was a problem hiding this comment.
Actionable comments posted: 17
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
api-test/src/main/resources/masterdata/GenderFilter/GenderFilter.yml (2)
79-104:⚠️ Potential issue | 🟡 MinorDescription does not match the test — the empty field is
type, nottext.Line 82 says "when the filter text is empty," but the actual input on line 91 has
"type": ""(empty type) while"text"is"Genderdummy". The error response also confirms:"Filter Type cannot be empty or null". The description should reference the filter type being empty, not the text.Proposed fix
- description: Verify that the system successfully processes the request and returns appropriate results when the filter text is empty while filtering gender entries + description: Verify that the system returns an error when the filter type is empty while filtering gender entries🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/GenderFilter/GenderFilter.yml` around lines 79 - 104, The test case Masterdata_GenderFilter_ValidTextAsEmpty_Smoke has an incorrect description: the input shows "type": "" (empty) while "text" is "Genderdummy" and the expected error is about the filter type; update the description to say the filter type is empty (e.g., "Verify system behavior when the filter type is empty") and, if templateFields should reflect the dynamic fields used in the input, add "type" to templateFields (replace or augment ["text"] with ["type","text"]) so the metadata matches the payload.
203-223:⚠️ Potential issue | 🟡 MinorDescription says "returns an error" but the test expects an empty result set, not an error.
Line 206 states the system "returns an error," but the
outputTemplateon line 211 isgenderFilterResult(notmasterdata/error), and the expected output on line 222 is{"filters": []}— a successful response with no matches. The description should reflect that the system returns an empty result set for non-matching text.Proposed fix
- description: Verify that the system returns an error when a non-existing filter text is provided while filtering gender entries + description: Verify that the system returns an empty result set when a non-existing filter text is provided while filtering gender entries🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/GenderFilter/GenderFilter.yml` around lines 203 - 223, The test case Masterdata_GenderFilter_InValidTextAsNonExisting has a misleading description; change the description field to state that the system returns an empty result set (no matches) when a non-existing filter text is provided rather than saying it "returns an error", and keep the existing outputTemplate (genderFilterResult) and expected output {"filters": []} unchanged so the description matches the test assertions.api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml (1)
871-884:⚠️ Potential issue | 🟡 MinorDescription says "language code is missing" but the test actually sends an invalid language code.
The input on line 884 provides
"langcode": "hhgghaJ"— this is not a missing value but an invalid one. The test name also saysWithout_langCode, but the description should still accurately describe the actual test behavior.✏️ Suggested fix
- description: Verify that the system returns an error when language code is missing while fetching paginated registration center records by hierarchy level and text + description: Verify that the system returns an error when an invalid language code is used to fetch paginated registration center records by hierarchy level and text🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml` around lines 871 - 884, The test case MasterData_FetchRegCent_By_Pagination_HierarchyLevel_Text_Without_langCode_Neg (uniqueIdentifier TC_Masterdata_FetchRegCent_30) has a mismatch: the description/name claim the language code is missing but the input contains an invalid langcode ("hhgghaJ"); update either the input or the metadata so they match—either remove/omit the "langcode" field (or set it to the $REMOVE$ token) in the input template to truly test a missing langcode, or change the test name/description to indicate "invalid langcode" and keep the current input; ensure you edit the description and the test identifier text (MasterData_FetchRegCent_By_Pagination_HierarchyLevel_Text_Without_langCode_Neg and description string) or the input's "langcode" field accordingly.
🧹 Nitpick comments (4)
api-test/src/main/resources/masterdata/GetUserDetailsByIdAndEffDate/GetUserDetailsByIdAndEffDate.yml (1)
38-38: Pre-existing typo in test key:GetUserDetailsByIsAndEffDate→GetUserDetailsByIdAndEffDate.Since this PR is about improving clarity, it would be a good opportunity to also fix this typo (
Is→Id) in the test case key name on this line.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/GetUserDetailsByIdAndEffDate/GetUserDetailsByIdAndEffDate.yml` at line 38, Rename the mistaken test key MasterData_GetUserDetailsByIsAndEffDate_InValid_effDate to MasterData_GetUserDetailsByIdAndEffDate_InValid_effDate; locate the entry named MasterData_GetUserDetailsByIsAndEffDate_InValid_effDate in GetUserDetailsByIdAndEffDate.yml and update the string `Is` → `Id` so the key reads MasterData_GetUserDetailsByIdAndEffDate_InValid_effDate consistently.api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml (1)
434-434: Minor punctuation inconsistency: trailing period.Line 434 ends with a period (
.) while the other descriptions in this file do not. Consider removing it for consistency.Proposed fix
- description: Verify that the system returns applicant type entries correctly when FLE, NFR, and CHL flags are set to true. + description: Verify that the system returns applicant type entries correctly when FLE, NFR, and CHL flags are set to true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml` at line 434, The description string "Verify that the system returns applicant type entries correctly when FLE, NFR, and CHL flags are set to true." has a trailing period that is inconsistent with other descriptions; remove the final period so the description ends without punctuation. Locate the YAML entry with the description field in GetApplicantType.yml (the line containing that exact description text) and update it to match the punctuation style used elsewhere.api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml (2)
532-532: Same inconsistency: missing "successfully" in this positive-path description.TC_19 also omits "successfully" — see note on TC_13 above.
✏️ Suggested fix
- description: Verify that the system fetches registration center records with pagination by hierarchy level and text using a valid language code + description: Verify that the system successfully fetches registration center records with pagination by hierarchy level and text using a valid language code🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml` at line 532, Update the positive-path test descriptions to include the word "successfully": edit the description fields in FetchRegCent.yml for the relevant test cases (e.g., the description for TC_19 and TC_13) so they read "...successfully fetches registration center records..." (or similar) instead of the current phrasing; locate the description entries by the test case IDs TC_19 and TC_13 and adjust the description strings accordingly.
357-357: Minor inconsistency: this positive-path description omits "successfully" unlike other positive test cases.Other positive test descriptions use "successfully fetches" (e.g., TC_01, TC_02, TC_05). This one just says "fetches". Consider aligning for consistency.
✏️ Suggested fix
- description: Verify that the system fetches registration center records by hierarchy level and list of text using a valid language code. + description: Verify that the system successfully fetches registration center records by hierarchy level and list of text using a valid language code🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml` at line 357, Update the description field in this test case to match other positive-path wording by inserting "successfully" so it reads: "Verify that the system successfully fetches registration center records by hierarchy level and list of text using a valid language code." Edit the description entry in FetchRegCent.yml (the test case's description property) to apply this exact phrasing for consistency with TC_01/TC_02/TC_05.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api-test/src/main/resources/masterdata/DeviceType/CreateDeviceType.yml`:
- Line 67: The test description is inaccurate: it asserts a duplicate-code error
(KER-MSD-053) because the payload reuses "code": "AUTO3$TESTDATACONTEXT$" (same
as TC_01), not a duplicate name; update the description in CreateDeviceType.yml
to say it verifies that creating a device type with a duplicate code is rejected
(mention KER-MSD-053) and ensure any textual references to "name" in this test
are replaced with "code" so the intent matches the asserted error.
In
`@api-test/src/main/resources/masterdata/FetchAllDocumentCategories/FetchAllDocumentCategories.yml`:
- Line 5: The test description in FetchAllDocumentCategories.yml incorrectly
mentions "language code and code filters" even though the request to
/documentcategories/all has no input; update the YAML 'description' value to a
concise, accurate sentence such as "Verify that the system can fetch all
document categories successfully" (or similar) so it reflects the actual test
behavior.
In `@api-test/src/main/resources/masterdata/FetchDevice/FetchDevice.yml`:
- Line 86: There is a wording typo in the YAML description: replace the
nonstandard word "unexisting" with "non-existent" in the description string used
by FetchDevice (the description field in FetchDevice.yml) so it reads "Verify
that the system returns an error when a non-existent device type is used to
fetch device records".
In `@api-test/src/main/resources/masterdata/FetchDeviceSpec/FetchDeviceSpec.yml`:
- Line 56: Update the description string in the FetchDeviceSpec test YAML where
it currently reads "unexisting device type code" to use the correct term
"non-existent device type code"; locate the description field under the
FetchDeviceSpec.yml test case (the line that starts with description: Verify
that the system returns an error when an unexisting device type code is used to
fetch device specification records) and replace "unexisting" with
"non-existent".
In `@api-test/src/main/resources/masterdata/FetchHolidays/FetchHoliday.yml`:
- Line 55: The description strings containing the phrase "unexisting" (e.g.,
"Verify that the system returns an error when an unexisting holiday ID is used
to fetch holiday records") should be updated to use standard English—replace
"unexisting" with "non-existing" or "nonexistent" consistently across all
occurrences (including the other similar descriptions noted in the file). Locate
the exact description lines in FetchHoliday.yml and perform a find-and-replace
of "unexisting" → "nonexistent" (or "non-existing") so all three instances are
corrected.
In `@api-test/src/main/resources/masterdata/FetchIdSchema/FetchIdSchema.yml`:
- Around line 3-5: The test description incorrectly says it "fetches all ID
schema records" while the endPoint is /v1/masterdata/idschema/latest; update the
description in FetchIdSchema.yml (uniqueIdentifier
TC_Masterdata_FetchIdSchema_01, endPoint /v1/masterdata/idschema/latest) to
state that it verifies fetching the latest ID schema (for a given/valid language
code) — wording must clearly differ from the FetchAllIdschema test to avoid
confusion.
In `@api-test/src/main/resources/masterdata/FetchLocation/FetchLocation.yml`:
- Line 111: Update the duplicate test descriptions so TC_06 and TC_09 are
clearly distinct: change TC_06's description to reference both parameters and
its endpoint (e.g., "Verify that the system successfully fetches location
details for a given locationcode and langcode via
/locations/info/{locationcode}/{langcode}") and change TC_09's description to
reference its endpoint and scope (e.g., "Verify that the system successfully
fetches location level data for a given langcode via
/locations/level/{langcode}"); edit the description fields for the tests
identified as TC_06 and TC_09 to use these clearer, endpoint-specific phrasings.
- Line 228: Update the test description for TC_12 in FetchLocation.yml so it
accurately reflects the expected output: change the sentence that says the
system "returns an error" to state that the system returns a validation status
"Invalid" (e.g., "Verify that the system returns a validation status of
'Invalid' when an invalid location name is used to fetch location details");
locate the TC_12 test block in FetchLocation.yml to make this exact wording
change.
In
`@api-test/src/main/resources/masterdata/FetchMissingDynamicField/FetchMissingDynamicField.yml`:
- Line 5: Update the YAML test descriptions so TC_01 and TC_02 are distinct:
change TC_01's description (currently phrased as "Verify that the system
successfully fetches all missing dynamic field records with valid input data")
to explicitly state it tests fetching missing dynamic fields when fieldName is
null (no specific field filter), and change TC_02's description to explicitly
state it tests fetching missing dynamic fields for a specific fieldName
("description"); locate the two descriptions by the test IDs TC_01 and TC_02 in
FetchMissingDynamicField.yml and replace the generic text with these clarified,
scenario-specific descriptions.
In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml`:
- Around line 838-841: The test case
MasterData_FetchRegCent_By_Pagination_HierarchyLevel_Text_langCode_MorePageSize_Neg
has a misleading description: the endpoint query uses pageNumber=100&pageSize=5
so the failure is due to an out-of-range page number, not an oversized page
size; update the description field for this YAML entry to state that it verifies
an error is returned when the page number is out of range (e.g., "Verify that
the system returns an error when an out-of-range page number is used to fetch
paginated registration center records by hierarchy level and language code") so
it accurately matches the endPoint and intent.
In
`@api-test/src/main/resources/masterdata/FetchRegCentDeviceHistory/FetchRegCentDeviceHistory.yml`:
- Line 71: The test case description string in the FetchRegCentDeviceHistory
YAML has inconsistent capitalization—change the description value from "verify
that the system returns an error when invalid effective date-time values are
provided while fetching the registration center device history" to start with a
capital "V" ("Verify ...") so it matches the other test descriptions; update the
description field in the FetchRegCentDeviceHistory.yml test case accordingly.
In `@api-test/src/main/resources/masterdata/FilterHolidays/FilterHolidays.yml`:
- Line 27: TC_02 and TC_09 in FilterHolidays.yml share identical descriptions
but test different filter columns and expectations; update each test description
to mention the specific column and expected result (e.g., TC_02: "Verify
filtering by isActive returns totalCount: 0 when invalid filter text is
provided" and TC_09: "Verify filtering by holidayName returns an empty response
when invalid filter text is provided") so test reports are unambiguous and
easier to triage.
In
`@api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml`:
- Line 682: The description for TC_22
(Masterdata_GetApplicantType_DOB_lessThanAYear) is misleading — it says the
system should return an error or handle gracefully, but the test expects a
successful response (uses outputTemplate
masterdata/GetApplicantType/getApplicantTypeResult and asserts applicantTypeCode
"005"). Update the description to reflect the expected success outcome, e.g.,
"Verify that the system returns the correct applicant type when the date of
birth is less than a year old," so it matches the test case name and expected
output.
In
`@api-test/src/main/resources/masterdata/GetHolidaysMissingIds/GetHolidaysMissingIds.yml`:
- Around line 18-21: Fix the typo in the test case key by renaming
Admin_GetHolidaysMissingIds_InValid_Inavild_langCode to a correct, clear key
(e.g., Admin_GetHolidaysMissingIds_InValid_Invalid_langCode or
Admin_GetHolidaysMissingIds_Invalid_langCode) in GetHolidaysMissingIds.yml;
update any external references (test runners, reports, skip lists, or other YAML
entries) that use the old key so they point to the new key to avoid breaking
test resolution.
In
`@api-test/src/main/resources/masterdata/GetMissingDocumentTypeByLangcode/GetMissingDocumentTypeByLangcode.yml`:
- Line 5: Update the YAML test descriptions to reflect that this endpoint
returns missing document type IDs rather than all document types: change both
description fields in GetMissingDocumentTypeByLangcode (and the duplicated case
at 20-20) to mention "missing document types" or "missing document type IDs" and
include the endpoint path /documenttypes/missingids/{langcode} or the test name
GetMissingDocumentTypeByLangcode to clarify the intent.
In
`@api-test/src/main/resources/masterdata/GetTemplateFileFormat/GetTemplateFileFormat.yml`:
- Around line 42-45: The test case
Masterdata_GetTemplateFileFormat_langcode_allValid_smoke has an inaccurate
description and a duplicate uniqueIdentifier; update its description to state
that it verifies retrieval of a template file format without a language code
(since the endpoint is /v1/masterdata/templatefileformats/code/{code} and
"langcode" is set to "$REMOVE$") and change the uniqueIdentifier from
TC_Masterdata_GetTemplateFileFormat_02 to TC_Masterdata_GetTemplateFileFormat_03
so it no longer collides with the inValid_code test case.
In `@api-test/src/main/resources/masterdata/GetTemplateType/TemplateType.yml`:
- Line 42: The two test case descriptions in TemplateType.yml are duplicated;
update the description for TC_03 to explicitly state it validates behavior when
both {code} and {langcode} are provided (e.g., "Verify system response when
fetching template types with both {code} and invalid {langcode}") and update
TC_05 to explicitly state it validates behavior when only {langcode} is provided
(e.g., "Verify system response when fetching template types with only an invalid
{langcode}"), locating the descriptions by the test IDs TC_03 and TC_05 in the
file.
---
Outside diff comments:
In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml`:
- Around line 871-884: The test case
MasterData_FetchRegCent_By_Pagination_HierarchyLevel_Text_Without_langCode_Neg
(uniqueIdentifier TC_Masterdata_FetchRegCent_30) has a mismatch: the
description/name claim the language code is missing but the input contains an
invalid langcode ("hhgghaJ"); update either the input or the metadata so they
match—either remove/omit the "langcode" field (or set it to the $REMOVE$ token)
in the input template to truly test a missing langcode, or change the test
name/description to indicate "invalid langcode" and keep the current input;
ensure you edit the description and the test identifier text
(MasterData_FetchRegCent_By_Pagination_HierarchyLevel_Text_Without_langCode_Neg
and description string) or the input's "langcode" field accordingly.
In `@api-test/src/main/resources/masterdata/GenderFilter/GenderFilter.yml`:
- Around line 79-104: The test case
Masterdata_GenderFilter_ValidTextAsEmpty_Smoke has an incorrect description: the
input shows "type": "" (empty) while "text" is "Genderdummy" and the expected
error is about the filter type; update the description to say the filter type is
empty (e.g., "Verify system behavior when the filter type is empty") and, if
templateFields should reflect the dynamic fields used in the input, add "type"
to templateFields (replace or augment ["text"] with ["type","text"]) so the
metadata matches the payload.
- Around line 203-223: The test case
Masterdata_GenderFilter_InValidTextAsNonExisting has a misleading description;
change the description field to state that the system returns an empty result
set (no matches) when a non-existing filter text is provided rather than saying
it "returns an error", and keep the existing outputTemplate (genderFilterResult)
and expected output {"filters": []} unchanged so the description matches the
test assertions.
---
Nitpick comments:
In `@api-test/src/main/resources/masterdata/FetchRegCent/FetchRegCent.yml`:
- Line 532: Update the positive-path test descriptions to include the word
"successfully": edit the description fields in FetchRegCent.yml for the relevant
test cases (e.g., the description for TC_19 and TC_13) so they read
"...successfully fetches registration center records..." (or similar) instead of
the current phrasing; locate the description entries by the test case IDs TC_19
and TC_13 and adjust the description strings accordingly.
- Line 357: Update the description field in this test case to match other
positive-path wording by inserting "successfully" so it reads: "Verify that the
system successfully fetches registration center records by hierarchy level and
list of text using a valid language code." Edit the description entry in
FetchRegCent.yml (the test case's description property) to apply this exact
phrasing for consistency with TC_01/TC_02/TC_05.
In
`@api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml`:
- Line 434: The description string "Verify that the system returns applicant
type entries correctly when FLE, NFR, and CHL flags are set to true." has a
trailing period that is inconsistent with other descriptions; remove the final
period so the description ends without punctuation. Locate the YAML entry with
the description field in GetApplicantType.yml (the line containing that exact
description text) and update it to match the punctuation style used elsewhere.
In
`@api-test/src/main/resources/masterdata/GetUserDetailsByIdAndEffDate/GetUserDetailsByIdAndEffDate.yml`:
- Line 38: Rename the mistaken test key
MasterData_GetUserDetailsByIsAndEffDate_InValid_effDate to
MasterData_GetUserDetailsByIdAndEffDate_InValid_effDate; locate the entry named
MasterData_GetUserDetailsByIsAndEffDate_InValid_effDate in
GetUserDetailsByIdAndEffDate.yml and update the string `Is` → `Id` so the key
reads MasterData_GetUserDetailsByIdAndEffDate_InValid_effDate consistently.
| endPoint: /v1/masterdata/devicetypes | ||
| uniqueIdentifier: TC_Masterdata_CreateDeviceType_04 | ||
| description: Create Device Type with duplicate data | ||
| description: Verify that the system does not allow creating a device type with a duplicate name |
There was a problem hiding this comment.
Inaccurate description: the test validates duplicate code, not duplicate name.
The test input reuses "code": "AUTO3$TESTDATACONTEXT$" (same as TC_01). The error KER-MSD-053 is a duplicate-record error keyed on code, not name. For similar masterdata entities, the name field does not need to be unique—only code does. The description should reflect this.
Suggested fix
- description: Verify that the system does not allow creating a device type with a duplicate name
+ description: Verify that the system does not allow creating a device type with a duplicate codeBased on learnings: "In the masterdata DocumentType entity, the 'name' field does not need to be unique. … only the 'code' field requires parameterization with
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: Verify that the system does not allow creating a device type with a duplicate name | |
| description: Verify that the system does not allow creating a device type with a duplicate code |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/DeviceType/CreateDeviceType.yml` at
line 67, The test description is inaccurate: it asserts a duplicate-code error
(KER-MSD-053) because the payload reuses "code": "AUTO3$TESTDATACONTEXT$" (same
as TC_01), not a duplicate name; update the description in CreateDeviceType.yml
to say it verifies that creating a device type with a duplicate code is rejected
(mention KER-MSD-053) and ensure any textual references to "name" in this test
are replaced with "code" so the intent matches the asserted error.
| endPoint: /v1/masterdata/documentcategories/all | ||
| uniqueIdentifier: TC_Masterdata_FetchAllDocumentCategories_01 | ||
| description: Retrieve All Document Categories with valid data | ||
| description: Verify that the system can fetch all document categories successfully using language code and code filters |
There was a problem hiding this comment.
Description mentions filters that aren't used in the test.
The description states "using language code and code filters," but the endpoint is /documentcategories/all and the input is empty. Consider simplifying to something like: "Verify that the system can fetch all document categories successfully".
Suggested fix
- description: Verify that the system can fetch all document categories successfully using language code and code filters
+ description: Verify that the system successfully returns all document categories when a valid request is made📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: Verify that the system can fetch all document categories successfully using language code and code filters | |
| description: Verify that the system successfully returns all document categories when a valid request is made |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@api-test/src/main/resources/masterdata/FetchAllDocumentCategories/FetchAllDocumentCategories.yml`
at line 5, The test description in FetchAllDocumentCategories.yml incorrectly
mentions "language code and code filters" even though the request to
/documentcategories/all has no input; update the YAML 'description' value to a
concise, accurate sentence such as "Verify that the system can fetch all
document categories successfully" (or similar) so it reflects the actual test
behavior.
| endPoint: /v1/masterdata/devices/{langCode}/{deviceType} | ||
| uniqueIdentifier: TC_Masterdata_FetchDevice_05 | ||
| description: Retrieve Device details non existing deviceType | ||
| description: Verify that the system returns an error when an unexisting device type is used to fetch device records |
There was a problem hiding this comment.
Typo: "unexisting" → "non-existent".
"Unexisting" is not a standard English word. Consider using "non-existent" for clarity.
✏️ Suggested fix
- description: Verify that the system returns an error when an unexisting device type is used to fetch device records
+ description: Verify that the system returns an error when a non-existent device type is used to fetch device records📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: Verify that the system returns an error when an unexisting device type is used to fetch device records | |
| description: Verify that the system returns an error when a non-existent device type is used to fetch device records |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/FetchDevice/FetchDevice.yml` at line
86, There is a wording typo in the YAML description: replace the nonstandard
word "unexisting" with "non-existent" in the description string used by
FetchDevice (the description field in FetchDevice.yml) so it reads "Verify that
the system returns an error when a non-existent device type is used to fetch
device records".
| endPoint: /v1/masterdata/devicespecifications/{langcode}/{devicetypecode} | ||
| uniqueIdentifier: TC_Masterdata_FetchDeviceSpec_04 | ||
| description: Retrieve device specification with non existing devicetypecode | ||
| description: Verify that the system returns an error when an unexisting device type code is used to fetch device specification records |
There was a problem hiding this comment.
Typo: "unexisting" → "non-existent"
"Unexisting" is not standard English. Use "non-existent" instead.
Proposed fix
- description: Verify that the system returns an error when an unexisting device type code is used to fetch device specification records
+ description: Verify that the system returns an error when a non-existent device type code is used to fetch device specification records📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: Verify that the system returns an error when an unexisting device type code is used to fetch device specification records | |
| description: Verify that the system returns an error when a non-existent device type code is used to fetch device specification records |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/FetchDeviceSpec/FetchDeviceSpec.yml`
at line 56, Update the description string in the FetchDeviceSpec test YAML where
it currently reads "unexisting device type code" to use the correct term
"non-existent device type code"; locate the description field under the
FetchDeviceSpec.yml test case (the line that starts with description: Verify
that the system returns an error when an unexisting device type code is used to
fetch device specification records) and replace "unexisting" with
"non-existent".
| endPoint: /v1/masterdata/holidays/{holidayid} | ||
| uniqueIdentifier: TC_Masterdata_FetchHolidays_04 | ||
| description: Retrieve Holiday details with nonexisting holidayid | ||
| description: Verify that the system returns an error when an unexisting holiday ID is used to fetch holiday records |
There was a problem hiding this comment.
Typo: "unexisting" → "non-existing" or "nonexistent".
"Unexisting" is not standard English. Consider using "non-existing" or "nonexistent" for clarity.
✏️ Suggested fix
- description: Verify that the system returns an error when an unexisting holiday ID is used to fetch holiday records
+ description: Verify that the system returns an error when a nonexistent holiday ID is used to fetch holiday records- description: Verify that the system returns an error when an unexisting holiday ID is used with a language code to fetch holiday records
+ description: Verify that the system returns an error when a nonexistent holiday ID is used with a language code to fetch holiday records- description: Verify that the system returns an error when an unexisting language code is used to fetch holiday records
+ description: Verify that the system returns an error when a nonexistent language code is used to fetch holiday recordsAlso applies to: 75-75, 96-96
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/FetchHolidays/FetchHoliday.yml` at
line 55, The description strings containing the phrase "unexisting" (e.g.,
"Verify that the system returns an error when an unexisting holiday ID is used
to fetch holiday records") should be updated to use standard English—replace
"unexisting" with "non-existing" or "nonexistent" consistently across all
occurrences (including the other similar descriptions noted in the file). Locate
the exact description lines in FetchHoliday.yml and perform a find-and-replace
of "unexisting" → "nonexistent" (or "non-existing") so all three instances are
corrected.
| endPoint: /v1/masterdata/getApplicantType | ||
| uniqueIdentifier: TC_Masterdata_GetApplicantType_22 | ||
| description: Retrieve Applicant Types for dateOfBirth lessthan a year | ||
| description: Verify that the system returns an error or handles gracefully when the date of birth provided is less than a year old while fetching applicant type entries |
There was a problem hiding this comment.
Description says "error or handles gracefully" but the test expects a success response.
TC_22 (Masterdata_GetApplicantType_DOB_lessThanAYear) uses outputTemplate: masterdata/GetApplicantType/getApplicantTypeResult (Line 686) and expects applicantTypeCode: "005" — this is a successful response, not an error. The description on Line 682 is misleading because it implies the system should return an error. Consider rewording to something like: "Verify that the system returns the correct applicant type when the date of birth is less than a year old."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml`
at line 682, The description for TC_22
(Masterdata_GetApplicantType_DOB_lessThanAYear) is misleading — it says the
system should return an error or handle gracefully, but the test expects a
successful response (uses outputTemplate
masterdata/GetApplicantType/getApplicantTypeResult and asserts applicantTypeCode
"005"). Update the description to reflect the expected success outcome, e.g.,
"Verify that the system returns the correct applicant type when the date of
birth is less than a year old," so it matches the test case name and expected
output.
| Admin_GetHolidaysMissingIds_InValid_Inavild_langCode: | ||
| endPoint: /v1/masterdata/holidays/missingids/{langcode} | ||
| uniqueIdentifier: TC_Masterdata_GetHolidaysMissingIds_02 | ||
| description: Retrieve holidays for missing IDs with a invalid language code | ||
| description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching holidays with missing IDs |
There was a problem hiding this comment.
Typo in test case ID: "Inavild" → "Invalid".
Since this PR is specifically about improving clarity, consider also fixing the typo in the test case key Admin_GetHolidaysMissingIds_InValid_Inavild_langCode. Note that renaming the key may require updating any references elsewhere (e.g., test runners, reports, or skip lists).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@api-test/src/main/resources/masterdata/GetHolidaysMissingIds/GetHolidaysMissingIds.yml`
around lines 18 - 21, Fix the typo in the test case key by renaming
Admin_GetHolidaysMissingIds_InValid_Inavild_langCode to a correct, clear key
(e.g., Admin_GetHolidaysMissingIds_InValid_Invalid_langCode or
Admin_GetHolidaysMissingIds_Invalid_langCode) in GetHolidaysMissingIds.yml;
update any external references (test runners, reports, skip lists, or other YAML
entries) that use the old key so they point to the new key to avoid breaking
test resolution.
| endPoint: /v1/masterdata/documenttypes/missingids/{langcode} | ||
| uniqueIdentifier: TC_Masterdata_GetDocumentTypeByLangCode_01 | ||
| description: Retrieve missing document type by valid language code | ||
| description: Verify that the system successfully returns all document types for a valid language code (smoke test) |
There was a problem hiding this comment.
Descriptions don't reflect that this endpoint returns missing document types.
The endpoint is /documenttypes/missingids/{langcode}, which returns missing IDs, not all document types. Both descriptions should mention "missing" to distinguish from the regular GetDocumentTypeByLangCode tests.
Suggested fix
- description: Verify that the system successfully returns all document types for a valid language code (smoke test)
+ description: Verify that the system successfully returns missing document type IDs for a valid language code (smoke test)- description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching document types
+ description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching missing document type IDsAlso applies to: 20-20
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@api-test/src/main/resources/masterdata/GetMissingDocumentTypeByLangcode/GetMissingDocumentTypeByLangcode.yml`
at line 5, Update the YAML test descriptions to reflect that this endpoint
returns missing document type IDs rather than all document types: change both
description fields in GetMissingDocumentTypeByLangcode (and the duplicated case
at 20-20) to mention "missing document types" or "missing document type IDs" and
include the endpoint path /documenttypes/missingids/{langcode} or the test name
GetMissingDocumentTypeByLangcode to clarify the intent.
| Masterdata_GetTemplateFileFormat_langcode_allValid_smoke: | ||
| endPoint: /v1/masterdata/templatefileformats/code/{code} | ||
| uniqueIdentifier: TC_Masterdata_GetTemplateFileFormat_02 | ||
| description: Retrieve template file format without language code and code | ||
| description: Verify that the system successfully returns all template file formats for a valid language code (smoke test) |
There was a problem hiding this comment.
Description is inaccurate; also, duplicate uniqueIdentifier.
-
Misleading description (line 45): The description says "returns all template file formats for a valid language code", but this test actually omits the language code — the endpoint is
/code/{code}(no{langcode}segment) and the input explicitly sets"langcode": "$REMOVE$". The description should reflect that this verifies retrieval without a language code. -
Duplicate identifier (line 44):
TC_Masterdata_GetTemplateFileFormat_02is already used by theinValid_codetest case on line 23. This should beTC_Masterdata_GetTemplateFileFormat_03.
Proposed fix
- uniqueIdentifier: TC_Masterdata_GetTemplateFileFormat_02
- description: Verify that the system successfully returns all template file formats for a valid language code (smoke test)
+ uniqueIdentifier: TC_Masterdata_GetTemplateFileFormat_03
+ description: Verify that the system successfully returns all template file formats when no language code is provided (smoke test)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Masterdata_GetTemplateFileFormat_langcode_allValid_smoke: | |
| endPoint: /v1/masterdata/templatefileformats/code/{code} | |
| uniqueIdentifier: TC_Masterdata_GetTemplateFileFormat_02 | |
| description: Retrieve template file format without language code and code | |
| description: Verify that the system successfully returns all template file formats for a valid language code (smoke test) | |
| Masterdata_GetTemplateFileFormat_langcode_allValid_smoke: | |
| endPoint: /v1/masterdata/templatefileformats/code/{code} | |
| uniqueIdentifier: TC_Masterdata_GetTemplateFileFormat_03 | |
| description: Verify that the system successfully returns all template file formats when no language code is provided (smoke test) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@api-test/src/main/resources/masterdata/GetTemplateFileFormat/GetTemplateFileFormat.yml`
around lines 42 - 45, The test case
Masterdata_GetTemplateFileFormat_langcode_allValid_smoke has an inaccurate
description and a duplicate uniqueIdentifier; update its description to state
that it verifies retrieval of a template file format without a language code
(since the endpoint is /v1/masterdata/templatefileformats/code/{code} and
"langcode" is set to "$REMOVE$") and change the uniqueIdentifier from
TC_Masterdata_GetTemplateFileFormat_02 to TC_Masterdata_GetTemplateFileFormat_03
so it no longer collides with the inValid_code test case.
| endPoint: /v1/masterdata/templatetypes/{code}/{langcode} | ||
| uniqueIdentifier: TC_Masterdata_TemplateType_03 | ||
| description: Retrieve template details by invalid language code and valid code | ||
| description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching template types |
There was a problem hiding this comment.
Duplicate descriptions for distinct test scenarios reduce clarity.
Lines 42 and 79 have identical descriptions, but they test different endpoints — TC_03 sends both {code} and {langcode}, while TC_05 sends only {langcode}. Since this PR aims to improve clarity, the descriptions should differentiate the two scenarios.
Proposed fix
Line 42:
- description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching template types
+ description: Verify that the system returns an error or handles gracefully when an invalid language code is provided along with a valid template type codeLine 79:
- description: Verify that the system returns an error or handles gracefully when an invalid language code is provided while fetching template types
+ description: Verify that the system returns an error or handles gracefully when an invalid language code is provided without a template type codeAlso applies to: 79-79
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-test/src/main/resources/masterdata/GetTemplateType/TemplateType.yml` at
line 42, The two test case descriptions in TemplateType.yml are duplicated;
update the description for TC_03 to explicitly state it validates behavior when
both {code} and {langcode} are provided (e.g., "Verify system response when
fetching template types with both {code} and invalid {langcode}") and update
TC_05 to explicitly state it validates behavior when only {langcode} is provided
(e.g., "Verify system response when fetching template types with only an invalid
{langcode}"), locating the descriptions by the test IDs TC_03 and TC_05 in the
file.
… clarity
Summary by CodeRabbit
Bug Fixes
Chores